package cate.game.farm.local.island;

import cate.game.db.facade.KvLoader;
import cate.game.db.mongo.kv.KvMongo;
import cate.game.framework.ModuleMan;

public class IslandManager extends ModuleMan {
    public IslandSPO data;

    @Override
    public void initDependent() throws Exception {
        data = new KvLoader<>(game, IslandSPO.class, KvMongo.KEY_ISLAND).getBySrvId();
    }

    @Override
    public void shutdown(){
        game.db.kv.save(data);
    }

    @Override
    public void onDaySpan(){
        data.checkCycle(game);
    }

}
